#ifndef RK_HPP
#define RK_HPP

#include <Eigen/Dense>
#include <Eigen/src/Core/Matrix.h>
#include <cmath>

#include "IVPSolver.hpp"

class RK : public IVPSolver{
public:
  // Constructor
  RK(int dim, double dt, double t0, double t1)
      : IVPSolver(dim, dt, t0, t1) {
    m_u.resize(std::floor((m_t1 - m_t0) / dt) + 1, m_dim);
  }

  // Destructor
  virtual ~RK() {}

  // Initialization
  virtual bool initializeSolver() = 0;

  // Getters for time parameters
  double getDt() const { return m_dt; }
  double getT0() const { return m_t0; }
  double getT1() const { return m_t1; }
  double getS() const { return m_s; }

protected:
  // const int m_dim;   // Dimension of the problem
  // const double m_dt; // Time step
  // const double m_t0; // Initial time
  // const double m_t1; // Final time
  // Eigen::MatrixXd m_u; // my solution
  int m_s;             // s-step
  // RK method coefficents
  Eigen::MatrixXd m_A;
  Eigen::VectorXd m_b;
  Eigen::VectorXd m_c;
};

#endif